package com.gdth.widget.edittext;

import com.gdth.R;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageView;

public class ImageEditText extends BaseEditText{
	/**
	 * 点击弹出下拉框按钮
	 */
	public ImageView mImageView;
	
	public ImageEditText(Context context) {
		super(context, R.layout.widget_edittext_image);
	}
	
	public ImageEditText(Context context, int layout) {
		super(context, layout);
	}
	
	public ImageEditText(Context context, AttributeSet attrs) {
		super(context, attrs, R.layout.widget_edittext_image);
	}
	
	public ImageEditText(Context context, AttributeSet attrs, int layout) {
		super(context, attrs, layout);
	}
	
	@Override
	public void initView(){
		super.initView();
        mImageView = (ImageView) findViewById(R.id.widget_edittext_image);
	}
	
	public void setOnClickListener(OnClickListener mOnClickListener){
		mImageView.setOnClickListener(mOnClickListener);
	}
	
	public void setLabel(String label){
		txt_label.setText(label);
	}
	
	public String getValue(){
		return txt_value.getText().toString();
	}
	
	public void setValue(String value){
		txt_value.setText(value);
	}
	
	public void setImage(Drawable drawable){
		mImageView.setImageDrawable(drawable);
	}
}
